package com.team.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * 开药批次明细表
 * @TableName prescription_batch_detail
 */
@TableName(value ="prescription_batch_detail")
public class PrescriptionBatchDetail implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 开药明细表主键ID
     */
    private Long prescriptionDetailId;

    /**
     * 药品批次表主键ID
     */
    private Long drugBatchId;

    /**
     * 用药数量
     */
    private Integer usedAmount;

    /**
     * 生产日期
     */
    private Date productionDate;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 修改时间
     */
    private Date updatedTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 开药明细表主键ID
     */
    public Long getPrescriptionDetailId() {
        return prescriptionDetailId;
    }

    /**
     * 开药明细表主键ID
     */
    public void setPrescriptionDetailId(Long prescriptionDetailId) {
        this.prescriptionDetailId = prescriptionDetailId;
    }

    /**
     * 药品批次表主键ID
     */
    public Long getDrugBatchId() {
        return drugBatchId;
    }

    /**
     * 药品批次表主键ID
     */
    public void setDrugBatchId(Long drugBatchId) {
        this.drugBatchId = drugBatchId;
    }

    /**
     * 用药数量
     */
    public Integer getUsedAmount() {
        return usedAmount;
    }

    /**
     * 用药数量
     */
    public void setUsedAmount(Integer usedAmount) {
        this.usedAmount = usedAmount;
    }

    /**
     * 生产日期
     */
    public Date getProductionDate() {
        return productionDate;
    }

    /**
     * 生产日期
     */
    public void setProductionDate(Date productionDate) {
        this.productionDate = productionDate;
    }

    /**
     * 创建时间
     */
    public Date getCreatedTime() {
        return createdTime;
    }

    /**
     * 创建时间
     */
    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    /**
     * 修改时间
     */
    public Date getUpdatedTime() {
        return updatedTime;
    }

    /**
     * 修改时间
     */
    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PrescriptionBatchDetail other = (PrescriptionBatchDetail) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPrescriptionDetailId() == null ? other.getPrescriptionDetailId() == null : this.getPrescriptionDetailId().equals(other.getPrescriptionDetailId()))
            && (this.getDrugBatchId() == null ? other.getDrugBatchId() == null : this.getDrugBatchId().equals(other.getDrugBatchId()))
            && (this.getUsedAmount() == null ? other.getUsedAmount() == null : this.getUsedAmount().equals(other.getUsedAmount()))
            && (this.getProductionDate() == null ? other.getProductionDate() == null : this.getProductionDate().equals(other.getProductionDate()))
            && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime()))
            && (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPrescriptionDetailId() == null) ? 0 : getPrescriptionDetailId().hashCode());
        result = prime * result + ((getDrugBatchId() == null) ? 0 : getDrugBatchId().hashCode());
        result = prime * result + ((getUsedAmount() == null) ? 0 : getUsedAmount().hashCode());
        result = prime * result + ((getProductionDate() == null) ? 0 : getProductionDate().hashCode());
        result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
        result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", prescriptionDetailId=").append(prescriptionDetailId);
        sb.append(", drugBatchId=").append(drugBatchId);
        sb.append(", usedAmount=").append(usedAmount);
        sb.append(", productionDate=").append(productionDate);
        sb.append(", createdTime=").append(createdTime);
        sb.append(", updatedTime=").append(updatedTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}